/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.brain.inve.dto;

import com.brain.core.dto.EmpresaDto;
import com.brain.segu.dto.RolDto;
import com.brain.segu.dto.UsuarioDto;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Transient;

/**
 *
 * @author HvivesO
 */
@Entity
@Table(name = "TINVE_SISTEMA_CONTROL_DETA")
public class SistemaControlInveDetaDto implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "SEQ_TINVE_SISTEMA_CONTROL_DETA")
    @TableGenerator(name = "SEQ_TINVE_SISTEMA_CONTROL_DETA", table = "TCORE_ENTIDAD", pkColumnName = "NOMBRE", valueColumnName = "CORRELATIVO", pkColumnValue = "TINVE_SISTEMA_CONTROL_DETA", allocationSize = 1)
    private Long id;
    @JoinColumn(name = "EMPRESA", referencedColumnName = "ID")
    @ManyToOne
    private EmpresaDto empresaDto;
    @Column(name = "IS_ROL")
    private String isRol;
    @JoinColumn(name = "ROL", referencedColumnName = "ID")
    @ManyToOne
    private RolDto rolDto;
    @JoinColumn(name = "USUARIO", referencedColumnName = "ID")
    @ManyToOne
    private UsuarioDto usuarioDto;
    @Column(name = "OBLIGATORIO")
    private Boolean obligatorio;
    @JoinColumn(name = "SISTEMA_CONTROL", referencedColumnName = "ID")
    @ManyToOne
    private SistemaControlInveDto sistemaControlInveDto;
    @Column(name = "ESTADO")
    private Boolean estado;
    @Transient
    private Long idTrasaccion;
    @Transient
    private Boolean conformidad;
    @Transient
    private Boolean flagBoton;
    @Transient
    private String comentario;

    public SistemaControlInveDetaDto() {
    }

    public SistemaControlInveDetaDto(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public String getIsRol() {
        return isRol;
    }

    public void setIsRol(String isRol) {
        this.isRol = isRol;
    }

    public RolDto getRolDto() {
        return rolDto;
    }

    public void setRolDto(RolDto rolDto) {
        this.rolDto = rolDto;
    }

    public UsuarioDto getUsuarioDto() {
        return usuarioDto;
    }

    public void setUsuarioDto(UsuarioDto usuarioDto) {
        this.usuarioDto = usuarioDto;
    }

    public Boolean getObligatorio() {
        return obligatorio;
    }

    public void setObligatorio(Boolean obligatorio) {
        this.obligatorio = obligatorio;
    }

    public SistemaControlInveDto getSistemaControlInveDto() {
        return sistemaControlInveDto;
    }

    public void setSistemaControlInveDto(SistemaControlInveDto sistemaControlInveDto) {
        this.sistemaControlInveDto = sistemaControlInveDto;
    }

    public Boolean getEstado() {
        return estado;
    }

    public void setEstado(Boolean estado) {
        this.estado = estado;
    }

    public EmpresaDto getEmpresaDto() {
        return empresaDto;
    }

    public void setEmpresaDto(EmpresaDto empresaDto) {
        this.empresaDto = empresaDto;
    }

    public Long getIdTrasaccion() {
        return idTrasaccion;
    }

    public void setIdTrasaccion(Long idTrasaccion) {
        this.idTrasaccion = idTrasaccion;
    }

    public Boolean getConformidad() {
        return conformidad;
    }

    public void setConformidad(Boolean conformidad) {
        this.conformidad = conformidad;
    }

    public Boolean getFlagBoton() {
        return flagBoton;
    }

    public void setFlagBoton(Boolean flagBoton) {
        this.flagBoton = flagBoton;
    }

    public String getComentario() {
        return comentario;
    }

    public void setComentario(String comentario) {
        this.comentario = comentario;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SistemaControlInveDetaDto)) {
            return false;
        }
        SistemaControlInveDetaDto other = (SistemaControlInveDetaDto) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.brain.comp.dto.SistemaControlDetaDto[ id=" + id + " ]";
    }
    
}
